package com.car.loan.project.xr.util.vo.after;

import com.car.loan.project.xr.util.bo.business.CustomerAddBo;
import com.car.loan.project.xr.util.repayment.RepaymentPlan;
import com.car.loan.project.xr.util.vo.LoanDetailVo.LoanBaseInfoVo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import lombok.Data;

/**
 * @author huangding
 * @date 2020/2/26 20:23
 */
@Data
public class OverdueUrgentLogInfo {

    @ApiModelProperty(value = "用户信息", required = true)
    private CustomerAddBo customerInfo;

    @ApiModelProperty("基本数据")
    private LoanBaseInfoVo loanBaseInfo;

    @ApiModelProperty("业务信息")
    private BusinessInfo businessInfo;

    @ApiModelProperty("车辆信息")
    private CarInfo carInfo;

    @ApiModelProperty("逾期信息")
    private OverdueInfo overdueInfo;

    @ApiModelProperty("催收记录")
    private List<UrgentLog> urgentLogs;

    @ApiModelProperty("还款计划")
    private List<RepaymentPlan> repaymentPlans;

    @ApiModelProperty("用户关系数据")
    private List<RelationshipInfo> relationshipInfos;

    @Data
    public static class RelationshipInfo {

        @ApiModelProperty("姓名")
        private String name;
        @ApiModelProperty("联系方式")
        private String mobile;
        @ApiModelProperty("关系")
        private String relationship;
    }

    @Data
    public static class BusinessInfo {


        @ApiModelProperty("融资银行")
        private String bankName;

        @ApiModelProperty(value = "分期金额，单位元", required = true)
        private Double installmentAmount;

        @ApiModelProperty(value = "执行费率，百分比", required = true)
        private Double rate;

        @ApiModelProperty(value = "融资金额", required = true)
        private Double financingAmount;

        @ApiModelProperty(value = "期数", required = true)
        private Long term;

        @ApiModelProperty(value = "首期账单日日期")
        private String firstRepayDate;

        @ApiModelProperty(value = "放贷日期", required = true)
        private String lendDate;

        @ApiModelProperty(value = "还款卡号", required = true)
        private String repayCardNo;

        @ApiModelProperty(value = "扣款卡号", required = true)
        private String deductionCardNo;

    }

    @Data
    public static class CarInfo {

        @ApiModelProperty("车辆品牌")
        private String brand;

        @ApiModelProperty("车辆类型")
        private String carType;

        @ApiModelProperty("车辆性质 新车二手")
        private Integer carNature;

        @ApiModelProperty("车牌类型公牌/私牌")
        private String plateType;

        @ApiModelProperty(value = "登记车主", required = true)
        private String registOwner;

        @ApiModelProperty("车牌号码")
        private String plateNo;


    }


    @Data
    public static class OverdueInfo {

        @ApiModelProperty("逾期金额（当前逾期金额）")
        private Double overdueAmount;

        @ApiModelProperty("垫款金额（已垫款金额）")
        private Double advancesAmount;

        @ApiModelProperty("最高逾期金额")
        private Double overdueMaxAmount;

        @ApiModelProperty("当期逾期期数")
        private Integer overdueTerm;

        @ApiModelProperty("累计逾期期数")
        private Integer overdueCount;

        @ApiModelProperty("本期最高逾期额")
        private Double currentOverdueMaxAmount;

        @ApiModelProperty("当前应还金额")
        private Double currentPayableAmount;

        @ApiModelProperty("本期月还金额")
        private BigDecimal currentMonthlyRepayment;


    }

    @Data
    public static class UrgentLog {

        @ApiModelProperty("1=电话催收2=上门催收")
        private Integer type;

        @ApiModelProperty("联系人姓名")
        private String name;

        @ApiModelProperty("联系电话")
        private String mobile;

        @ApiModelProperty("与客户关系")
        private String relationship;

        @ApiModelProperty("备注")
        private String remark;

        @ApiModelProperty("催收人员")
        private String adminName;

        @ApiModelProperty("催收时间")
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
        private LocalDateTime createTime;
    }


}
